#include<stdio.h>
void score(void)
{
	int max,maxa,maxb,i,j,n,t,tam,a[100];
	scanf("%d",&t);
	while (t!=0)
	{
		scanf("%d",&n);
		for (i=0;i<n;i++)
		{
			scanf("%d",&a[i]);
		}
		//sap xep giam dan
		for (i=0;i<n-1;i++)
		{
			for (j=i+1;j<n;j++)
			{
				if (a[i]<a[j])
				{
					tam=a[i];
					a[i]=a[j];
					a[j]=tam;
				}
			}
		}
		//tim phan gia tri max
		max=a[i];
		maxa=1;
		for (i=0;i<n;i++)
		{
			maxb=1;
			for (j=i+1;j<n;j++)
			{
				if(a[i]==a[j])
				{
					maxb++;
				}
			}
			if (maxb>maxa)
			{
				maxa=maxb;
				max=a[i];
			}
		}
		//in ra gia tri lon nhat 
		for (i=0;i<n;i++)
		{
			if (a[i]==max)
			{
				printf("%d",i+1);
				break;
			}
			
		}
		t--;
	}
}
main()
{
	score();
}
